<!DOCTYPE html>
<html lang="en">

{include file='Public:head'}

<body data-type="widgets">
<script src="/assets/js/theme.js"></script>
<div class="am-g tpl-g">
    {include file='Public:header'}
    {include file='Public:menu2'}
    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="row-content am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title  am-cf">商品规格</div>

                        </div>
                        <div class="widget-body  am-fr">

                            <div class="am-u-sm am-u-md am-u-lg" >
                                <form class="am-form" action="{:Url('Specification/SpecificationSearch')}">
                                    <div class="am-form-group am-form-select">
                                        <select name="type_id" class="" style="width:200px;">
                                            <option value="">所有分类</option>
                                            {foreach $select as $k=>$v}
                                            <option value="{$v.id}">{$v.name}</option>
                                            {/foreach}

                                        </select>
                                    </div>
                                    <button type="submit" class="am-btn am-btn-secondary" style="width: 80px;margin-left:230px;margin-top:-102px; ">筛选</button>
                                </form>
                                <div class="am-form-group" >
                                    <div class="am-btn-toolbar" >
                                        <div class="am-btn-group am-btn-group-xs" style="float: right;">
                                            <a href="{:Url('Specification/SpecificationAdd')}" class="am-btn am-btn-secondary" style="height:37px;line-height:22px;margin-top:-80px; "><span class="am-icon-plus" ></span> 添加规格</a>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="am-u-sm-12">
                                <table  class="am-table am-table-compact am-table-striped tpl-table-black " id="example-r">
                                    <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>规格名称</th>
                                        <th>规格类型</th>
                                        <th>规格项</th>
                                        <th>筛选</th>
                                        <th>排序</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {foreach $listAll as $K=>$v}
                                    <tr class="gradeX">
                                        <td>{$v.s_id}</td>
                                        <td>{$v.spec_name}</td>
                                        <td>{$v.name}</td>
                                        <td>{$v.item}</td>
                                        <td></td>
                                        <td>{$v.order}</td>
                                        <td>
                                            <div class="tpl-table-black-operation">
                                                <a href="{:Url('Specification/SpecificationUpdate',array('id'=>$v.s_id))}" class="btn btn-primary" title="编辑"><i class="fa fa-pencil"></i></a>
                                                <a href="javascript:void(0);" onclick="del_buttonfr({$v.s_id})" class="btn btn-danger" title="删除"><i class="fa fa-trash-o"></i></a>
                                            </div>
                                        </td>

                                    </tr>
                                      {/foreach}

                                    <!-- more data -->
                                    </tbody>
                                </table>
                            </div>
                            <div class="am-u-lg-12 am-cf">

                                <div class="am-fr">
                                     {$list->render()}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>
<script src="/assets/js/amazeui.datatables.min.js"></script>
<script src="/assets/js/dataTables.responsive.min.js"></script>

</body>
{include file='Public:script'}

</html>